import { ApiProperty } from '@nestjs/swagger';

export class CommentListVo {
  id: number;

  @ApiProperty({ description: '发布时间' })
  createAt: string;

  @ApiProperty({ description: '评论人id' })
  createdBy: number;

  @ApiProperty({ description: '文章id' })
  articleId: number;

  @ApiProperty({ description: '评论内容' })
  content: string;

  @ApiProperty({ description: '评论人名称' })
  userName: string;

  @ApiProperty({ description: '评论人头像' })
  userAvatar: string;

  @ApiProperty({ description: '是否根评论' })
  rootId: number;

  @ApiProperty({ description: '回复的评论id' })
  toCommentId: number;

  @ApiProperty({ description: '回复的评论人id' })
  toCommentUserId: number;

  @ApiProperty({ description: '回复的评论人名称' })
  toCommentUserName: string;

  @ApiProperty({ description: '回复的评论人头像' })
  toCommentUserAvatar: string;

  @ApiProperty({ description: '子级评论' })
  children: CommentListVo[];
}
